home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / disk / dspeed.zip / FSEEK.8 next >
Text File  |  1993-05-03  |  3KB  |  65 lines

  1.   
  2.   
  3.   ;Program to maximize the potential of IBM and compatables' floppy
  4.   ;disc drives....also makes them quieter.
  5.   ;
  6.   ;DOS sets floppy seek time at 8ms.. most drives will run at 3ms
  7.   ;Drive parameter table works in multiples of 2. "Turbo" boards are
  8.   ;faster, so experiment 'til you get errors and increment by next higher
  9.   ;value.
  10.   ;
  11.   ;Accepts command line number and inserts in the appropriate memory 
  12.   ;location - if none,displays help screen and accepts keyboard input.
  13.   ;
  14.   ;The one glitch is that if you won't listen to reason and keep putting
  15.   ;in invalid numbers, the thing won't exit. Of course, it seems pretty
  16.   ;farfetched for someone to invoke a program and then refuse to use
  17.   ;it. 
  18.                JMP MAIN
  19.   CR           equ 0d
  20.   LF           equ 0a
  21.   data_table   db 0ff,0ff,0ef,0ef,0df,0df,0cf ;can only use 2,4,6,8ms
  22.   Help_mess    db'Usage:fseek {value}',CR,LF,'$'
  23.   _Action      db'Now Changing Head Seek Time to '
  24.   SEEK         db'?'
  25.                db' ms',CR,LF,'$'
  26.   _Error       db'Incorrect Value; Valid entry:2-8',CR,LF,'$'
  27.   
  28.   MAIN:        mov si,081                ; check for command line entry
  29.                mov cx,4
  30.   COMMAND:     lodsb                     
  31.   KEYB:        cmp al,031                ; valid figure? =>2
  32.                ja _PARSE                 ; ok,process
  33.                loopnz COMMAND
  34.                jmp ERROR                 ; otherwise, cockpit error
  35.            
  36.   _PARSE:      xor ah,ah
  37.                cmp al,038                ; valid figure? =<8
  38.                ja ERROR                  ; somebody goofed!!
  39.                mov SEEK,al               ; finally we can go to work
  40.                sub al,032                ; change to binary
  41.                mov si,offset data_table  ; appropriate that sucker
  42.                add si,ax                 ;
  43.                lodsb                     ;
  44.                xor dx,dx
  45.                push dx
  46.                pop es
  47.                es mov [0522],ax          ; Put new value into
  48.                mov dx,offset _Action     ; DOS drive parameter table
  49.                mov ah,09                 ;
  50.                int 021
  51.                int 020                   ; we're done..simple,huh?
  52.  
  53.   ERROR:       mov dx,offset Help_mess
  54.                mov ah,09
  55.                int 021
  56.                mov dx,offset _Error
  57.                mov ah,09
  58.                int 021
  59.                mov ah,00
  60.                int 016
  61.                jmp KEYB
  62.                              
  63.  
  64.  
  65.